/*
 * @Author: Marte
 * @Date:   2016-10-24 11:12:58
 * @Last Modified by:   Marte
 * @Last Modified time: 2016-11-03 14:42:57
 */

'use strict';

var _ = require('underscore');

var oracledb = require('../utils/oracleUtil');

var connection;

module.exports.create = function() {
    oracledb.connection()
        .then(function(conn) {
            connection = conn;
            return connection.execute('Create Table type(id int Primary key,typeName varchar2(500))');
        })
        .then(function() {
            connection.execute('create sequence type_seq increment by 1 start with 1 minvalue 1  maxvalue 9999999999999 nocache order');
        })
        .catch(function(err) {
            console.log(err.message);
        });
};
